<?php
namespace app\cms\model;
/* *
 * 标签管理
 * */
class label extends \app\base\model\AdminModel{
    protected $table ='cms_lable';  //模型表
    
    //列表
    public function _select(){
        return $this->select();
    }

    //查询单个
    public function _find($where,$field = NULL){
       return $this->where($where)->field($field)->find();
    }

    //删除
    public function _delete($condition){
        return $this->where($condition)->delete();
    }  

    //编辑
    public function _update($data,$condition = NULL){
        if($condition){
            return $this->where($condition)->data($data)->update();
        }else{
            return $this->data($data)->insert();
        }
    }  
}